<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="m" uri="http://www.ericsson.com/sn/mobilefaces"%>
<%@page contentType="text/html;charset=UTF8"%>
<f:view>
    <m:doctype/>
    <m:html>
        <head>
            <m:title content="Mobile News"/>
        </head>
        <m:body>
            <m:h2><h:outputText value="移动速递"/></m:h2>
            <h:form>
                <h:panelGroup>
                    <h:dataTable  title="十大快报" value="#{Reader.feed.entries}" var="entry" bgcolor="#F1F1F1">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="标题"/>
                            </f:facet>
                            <h:commandLink action="#{Reader.onSelectEntry}">
                                <f:param name="index" value="#{entry.index}"/>
                                <h:outputText value="#{entry.title}">
                                </h:outputText>
                            </h:commandLink>
                        </h:column>
                    </h:dataTable>
                    <h:panelGrid columns="3">
                        <h:commandButton value="最新" action="#{Reader.onRefresh}">
                        </h:commandButton>
                    </h:panelGrid>
                </h:panelGroup>
            </h:form>
        </m:body>
    </m:html>
</f:view>
